-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(turborepo): add berry support for built meta when pruning #8550
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
@vinnymac is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for the PR! I think this looks good to me, but I'll be doing some additional testing just because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
@@ -163,6 +163,9 @@ where | |||
|
|||
for (dependency, meta) in metadata { | |||
let dependency = dependency.as_ref(); | |||
if meta.built.unwrap_or_default() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this, I believe this logic needs to be changed so we only include built
if it is present. add_line
will also need to be updated to be able to write both true and false.
if meta.built.unwrap_or_default() { | |
if meta.built.unwrap_or_default() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it so all three dependencyMeta settings support true and false. And check if they are present before adding the lines.
Let me know if you find any more 🐛 s. 🙇🏼♂️
if let Some(optional) = meta.optional { | ||
add_line(dependency, "optional", optional); | ||
} | ||
if let Some(unplugged) = meta.unplugged { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After updating this for built
, I assumed someone may set optional or unplugged to false, and then that too would become an issue.
@chris-olszewski fixed an issue with this change where I somehow forgot to support more than one dependency meta setting for a single dependency 😅. This should do the job now, let me know what you think. |
Description
Add support for yarn berry built option for dependencies meta to
turbo prune
.Without this change,
yarn install --immutable
fails becausebuilt
is added after turbo accidentally removes it, triggering the following error.Testing Instructions
built: false
.yarn install --immutable
on that small lockfile